
public class Main {
	public static void main(String[] args) {
		double pi=0.0;
		double a=0.0;
		double b=0.0 ;
		for (double i = 1;i<=1000000 ;i++ ) {
			if (i%2==0) {

				
				a = a +(-1/(2*i-1));

			}else{
			
				b=b +(1/(2*i-1));
			}
			pi=a+b;
		}
	System.out.println(4*pi);
	}
}
